﻿using ASP_MVVC.Data;
using ASP_MVVC.Models;
using Microsoft.AspNetCore.Mvc;

namespace ASP_MVVC.Controllers
{
    public class Chp03Controller : Controller
    {
        ApplicationDbContext db = new ApplicationDbContext();
        private readonly ApplicationDbContext _context;

        public Chp03Controller(ApplicationDbContext context)
        {
            _context = context;
        }

        public IActionResult Demo01()
        {
            
            var listView = from Invoices in db.Invoices
                           select new
                           {
                               EmpId = Invoices.Id,
                               EmpAmount= Invoices.Amount,
                           };
            return View();
        }
    }
}
